/*
 * @Description:
 * @Author: maxyang
 * @Date: 2022-05-17 17:33:15
 * @LastEditTime: 2022-07-14 23:05:21
 * @LastEditors: liutq
 * @Reference:
 */
/*
 * @Description:
 * @Author: maxyang
 * @Date: 2022-05-17 17:33:15
 * @LastEditTime: 2022-06-04 07:50:55
 * @LastEditors: liutq
 * @Reference:
 */
package common

import (
	"time"
)

type RegisterStruct struct {
	Username   string `json:"username" binding:"required"`
	Password   string `json:"password" binding:"required"`
	Phone      int64  `json:"phone" binding:"required"`
	Idnum      string `json:"idnum" binding:"required"`
	InviteCode string
	FromCode   string
	Code       string `json:"code" binding:"required"`
	Ip         string
}

type SmsCode struct {
	Phone int64
	Ip    string
	Scene uint8
}

type Verfycode struct {
	Phone int64
	Scene uint8
	Code  string
}

type GoodsList struct {
	GoodsCate uint8 `json:"goods_cate" binding:"required" `
	Page      uint  `json:"page" binding:"required,gt=0" `
	PerPage   uint  `json:"per_page"`
	UserId    uint  `json:"user_id"`
}

type AdminGoodsList struct {
	GoodsCate uint8
	Page      uint `binding:"required,gt=0" `
	PerPage   uint
	Key       string
}

type AnnouncementList struct {
	Page    int  `json:"page" binding:"required,gt=0" `
	PerPage int  `json:"per_page"`
	UserId  uint `json:"user_id"`
}

type ResponseList struct {
	Page    uint
	PerPage uint
	Total   uint
	Data    []interface{}
}

type PramCollect struct {
	Page    int  `json:"page" binding:"required,gt=0" `
	PerPage int  `json:"per_page"`
	UserId  uint `json:"user_id"`
	Id      uint `json:"id"`
	Kind    uint `json:"kind" binding:"required,gt=0" `
}

type Detail struct {
	UserId uint `json:"user_id"`
	Id     uint `json:"Id" binding:"required,gt=0" `
}

type Gift struct {
	//奖品名称
	Name string
	//概率
	Prop int
	//类型
	Type int
	//数量
	Count int
	//幸运值
	LuckyNum uint

	//商品ID
	Id uint
}

type OpenGift struct {
	//奖品名称
	Name string
	//类型
	Type int
	//商品ID
	Id uint
	//列表图片
	ListImg string
}

type DrawQuery struct {
	UserId  uint `json:"user_id"`
	GoodsId uint `json:"GoodsId" binding:"required,gt=0" `
}

type Goods struct {
	ID               uint
	GoodsName        string  `binding:"required" `
	GoodsType        uint8   `binding:"required,gt=0" `
	GoodsCate        uint8   `binding:"required,gt=0" `
	GoodsKind        uint8   `binding:"required,gt=0"`
	GoodsBlindCode   string  `binding:"required" `
	GoodsPrice       float64 `binding:"required,gt=0" `
	GoodsRepoPrice   float64
	GoodsRepoDay     uint8
	GoodsListImg     string `binding:"required" `
	GoodsD3Img       string `binding:"required" `
	GoodsCirculation uint   `binding:"required,gt=0" `
	GoodsStore       uint   `binding:"required" `
	GoodsAuthorUid   uint
	GoodsDescribe    string
	GoodsIssuer      string
	GoodsAuthorized  string
	GoodsOptionId    uint
	Status           uint8
	VshopUrl         string
	Createtime       time.Time
	Updatetime       time.Time
	Drawtime         string
	LuckyNum         uint
}

type GoodsChainInfo struct {
	ID              uint      `json:"id"`
	GoodsId         uint      `json:"goods_id"`
	CertificatId    string    `json:"certificat_id"`
	CertificatHash  string    `json:"certificat_hash"`
	CertificatTiime time.Time `json:"certificat_tiime"`
	BlockHeight     uint      `json:"block_height"`
	CreateTime      time.Time `json:"create_time"`
}

type Irrigation struct {
	ID            uint
	GoodsId       uint `binding:"required,gt=0"`
	IrrigationNum uint `binding:"required"`
}

type UserList struct {
	Page     int `json:"page" binding:"required,gt=0" `
	PerPage  int `json:"per_page"`
	RankSort string
	Key      string
}

type UserStatus struct {
	Id     uint
	Status uint8
}

type OpenDraw struct {
	GoodsId uint ` binding:"required,gt=0" `
	Opennum uint ` binding:"required,gt=0" `
}

type Repo struct {
	ID                    uint
	UId                   uint
	CollectId             uint   `binding:"required,gt=0" `
	GoodsId               uint   `binding:"required,gt=0" `
	OpenAccountName       string `binding:"required"`
	BankAccount           string `binding:"required"`
	OpenAccountBank       string `binding:"required"`
	AccountOpeningOutlets string `binding:"required"`
	ShaiUrl               string `binding:"required"`
	Status                uint8
}

type Mycollect struct {
	GoodsId       uint
	RepoStatus    uint8
	RepoStartTime time.Time
}

type RepoList struct {
	CollectId uint
	Page      uint `binding:"required,gt=0" `
	PerPage   uint `binding:"gt=0" `
}

type RepoModify struct {
	Id     uint
	Status uint8
}

type ModifyPassword struct {
	Phone    int64  `binding:"required"`
	Code     string `binding:"required"`
	Password string `binding:"required"`
}

type Banner struct {
	ID         uint
	BannerUrl  string `binding:"required"`
	Title      string
	JumpUrl    string `binding:"required"`
	CreateTime time.Time
	Status     uint8
}
